package cn.njupt.gis.util;


public class Coord2doc {
	double minX;
	double maxX;
	double minY;
	double maxY;
	double screenX;
	double screenY;
 
	public Coord2doc(double _minX,double _minY,double _maxX,double _maxY,double _screenX,double _screenY)
	{
		minX = _minX;
		minY = _minY;
		maxX = _maxX;
		maxY = _maxY;
		screenX = _screenX;
		screenY = _screenY;
 
	}
	public   int coord2docX(double x )
	{
		return  (int)((((x-minX)*1000)/((maxX-minX)*1000))*screenX);
	}
	public   int coord2docY(double y)
	{
		return  (int)((((y-minY)*1000)/((maxY-minY)*1000))*screenY);
	}
}
